//
//  YZMSpreadUserHeaderView.m
//  YZMicroStock
//
//  Created by apple on 17/1/5.
//  Copyright © 2017年 cqjr. All rights reserved.
//

#import "YZMSpreadUserHeaderView.h"

@interface YZMSpreadUserHeaderView ()
@property(nonatomic, strong) UILabel *titleLabel;
@property(nonatomic, strong) UILabel *numberLabel;
@property(nonatomic, strong) UILabel *timeLabel;

@end

@implementation YZMSpreadUserHeaderView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self createObject];
    }
    return self;
}

-(void)createObject{
    
    self.contentView.backgroundColor=[YZMAppStyle colorForMain];

    self.titleLabel=[YZMAppStyle labelWithMediumWhite];
    _titleLabel.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(16);
        make.width.mas_offset(ScreenWidth*0.3);
    }];
    
    
    self.numberLabel=[YZMAppStyle labelWithMediumWhite];
    _numberLabel.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_numberLabel];
    [_numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.top.equalTo(_titleLabel);
        make.width.mas_offset(ScreenWidth*0.3);
        make.left.equalTo(_titleLabel.mas_right);
    }];
    
    self.timeLabel=[YZMAppStyle labelWithMediumWhite];
    _timeLabel.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_timeLabel];
    [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_titleLabel);
        make.width.mas_offset(ScreenWidth*0.4);
        make.right.equalTo(self);
    }];
    
    _titleLabel.text=@"用户";
    _numberLabel.text=@"点买金额";
    _timeLabel.text=@"注册时间";
    
    _topLine=[YZMAppStyle splitLine];
    [self addSubview:_topLine];
    [_topLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self);
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self.mas_right).offset(-10);
    }];
    
}

@end
